package o;

import androidx.annotation.MainThread;
import androidx.annotation.Nullable;
import java.io.Closeable;
import java.util.HashMap;
import java.util.Map;

public abstract class lc {
    @Nullable
    private final Map<String, Object> ˊ = new HashMap();
    private volatile boolean ˋ = false;

    protected void ˏ() {
    }

    @MainThread
    final void ॱ() {
        this.ˋ = true;
        if (this.ˊ != null) {
            synchronized (this.ˊ) {
                for (Object ˋ : this.ˊ.values()) {
                    ˋ(ˋ);
                }
            }
        }
        ˏ();
    }

    private static void ˋ(Object obj) {
        if (obj instanceof Closeable) {
            try {
                ((Closeable) obj).close();
            } catch (Throwable e) {
                throw new RuntimeException(e);
            }
        }
    }
}
